package org.xmh.demo.common;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

import org.personal.jdbc.JdbcTemplate;

public class ConnectionUtil {

	public static JdbcTemplate init(){
		Properties prop=new Properties();
		try {
			prop.load(
					ConnectionUtil.class.getClassLoader().getResourceAsStream("/db.properties"));
					//new FileInputStream(new File("D:/kp/Workspaces/struts2/src/db.properties")));
					
			return new JdbcTemplate(prop);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}
	
}
